package com.github.cakin.shiro.chapter13.service;

import com.github.cakin.shiro.chapter13.dao.PermissionDao;
import com.github.cakin.shiro.chapter13.entity.Permission;

/**
 * @className: PermissionServiceImpl
 * @description: 权限服务实现类
 * @date: 2020/5/19
 * @author: cakin
 */
public class PermissionServiceImpl implements PermissionService {
    /**
     * 权限访问层
     */
    private PermissionDao permissionDao;

    public void setPermissionDao(PermissionDao permissionDao) {
        this.permissionDao = permissionDao;
    }
    /**
     * 功能描述：创建权限
     *
     * @author cakin
     * @date 2020/5/19
     * @param permission 权限
     * @return Permission 权限
     */
    public Permission createPermission(Permission permission) {
        return permissionDao.createPermission(permission);
    }
    /**
     * 功能描述：删除权限
     *
     * @author cakin
     * @date 2020/5/19
     * @param permissionId 权限id
     */
    public void deletePermission(Long permissionId) {
        permissionDao.deletePermission(permissionId);
    }
}
